<%@ page pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/common/taglibs.jsp"%>
<head>
<title><s:text name="webapp.name" /></title>
<%@ include file="/common/meta.jsp"%>
</head>
<body>
	<s:form action="roleRight_save" method="post" validate="true" theme="simple">
		<%@ include file="/common/header.jsp"%> 
	    <!----------- 数据列表 ------------------>
	    <table width="100%" border="0"  width="*" cellpadding="0" cellspacing="1" class="dg_borderstyle">
			<tr> 
				<td class="dg_headerstyle"><s:text name="role.name" /></td>
				<td class="dg_headerstyle"><s:text name="role.sort" /></td>
				<td class="dg_headerstyle"><s:text name="base.versionNum" /></td>
				<td class="dg_headerstyle"><s:text name="base.dateCreate" /></td>
				<td class="dg_headerstyle"><s:text name="base.dateUpdate" /></td>
				<td  class="dg_headerstyle"><s:text name="button.ctrl" /></td>
			</tr>
			<s:iterator value="roleList">
			<tr class="dg_alternatingitemstyle">
			    <td align="left"><a href="${ctx}/roleRight_list?role.id=${id}">${name}</a></td>
				<td align="left">${sort}</td>
				<td align="center">${versionNum}</td>
				<td align="center">${dateCreate}</td>
				<td align="center">${dateUpdate}</td>
				<td align="center">
					<a href="${ctx}/roleRight_list?role.id=${id}"><s:text name="button.modify" /></a>
					- <a href="${ctx}/roleRight_remove?role.id=${id}"><s:text name="button.delete" /></a>
				</td>
			</tr>
			</s:iterator>
		</table> 
		<!------------------ 编辑栏 ------------------>
		<table class="ow_fim_mg" style="margin-top:5px;" cellspacing="1" cellpadding="3">  
			<tr>
				<td class="ow_fim_l" width="90">
				    <s:text name="role.name" /> <s:text name="colon" />
				</td>
				<td class="ow_fim_r"> 
					<s:textfield name="role.name" class="effect"></s:textfield> 
				    <s:hidden name="role.id" />
				</td>  
			</tr>
            <tr>
				<td class="ow_fim_l">
					<s:text name="role.sort" /> <s:text name="colon" />
				</td>
				<td class="ow_fim_r">
					<s:textfield name="role.sort" class="effect"></s:textfield>
				</td>
			</tr>   
			<tr>
				<td class="ow_fim_l">
					<s:text name="roleRight.title" /><s:text name="colon" /> 
				</td>
				<td class="ow_fim_r"> 
					<table border="0" cellspacing="1" cellpadding="0">
						<tr>
							<th align="center"><input type="checkbox" id="chooseAll" /></th>
							<th align="left" width="200px"><s:text name="right.title" /></th>
						</tr>
						<s:iterator value="rightList">
						<tr>
							<td align="center">
								<s:if test="checked">
									<input type="checkbox" name="ids" value="${id}" checked="checked" />
								</s:if> 
								<s:else>
									<input type="checkbox" name="ids" value="${id}" />
								</s:else>
							</td>
							<td align="left">${name}</td>
						</tr>
						</s:iterator>
					</table>
				</td>
			</tr>
		</table>
		<table width="*" align="right">
			<tr>
				<td class="rtm_shb_r"> 
				    <s:submit action="roleRight_input" key="button.add" onclick="form.onsubmit=null"></s:submit>
					<s:submit key="button.save"></s:submit>
					<s:submit action="roleRight_remove" key="button.delete" onclick="form.onsubmit=null"></s:submit>
				</td> 
			</tr>
		</table>
		<%@ include file="/common/footer.jsp"%>
	</s:form>
</body>
</html>
